<?php

namespace app\api\controller;

use app\common\controller\Api;
use think\Db;
class Article extends Api
{

    protected $noNeedLogin = ['*'];
    protected $noNeedRight = ['*'];

    public function article()
    {
        $param=$this->request->param();
        $where['category_id']=$param['category_id'];
        $list=Db::name('article')->where($where)->paginate();
        $this->success('',$list);
    }
    public function articleDetails()
    {
        $param=$this->request->param();
        $where['id']=$param['id'];
        $find=Db::name('article')->where($where)->find();
        $this->success('',$find);
    }
    public function page()
    {
        $param=$this->request->param();
        $where['id']=$param['id'];
        $find=Db::name('page')->where($where)->find();
        $this->success('',$find);
    }
}
